<script type="text/javascript">
	$(function() {
	    $.fn.dataGridOptions.formSubFun("#form",'/coupon/doModify.html',"修改成功！","修改失败！");
	});
</script> 
<form id="form"  method="post">
<div class="popForm sForm">
    <input type="hidden" name="category" value="${coupon.category}">
    <input type="hidden" name="id" value="${coupon.id}">
    
    <div class="formitm">
		<label class="lab">名称：</label>
		<div class="ipt"><input type="text" id="categoryName" name="name" class="easyui-validatebox validatebox-text" data-options="required: true" value="${coupon.name}"></div>
	</div>
	<div class="formitm">
		<label class="lab">种类：</label>
		<div class="ipt">
			<select name="code" id="type">
				<option value="1">用户注册</option>
				<option value="2">实名认证</option>
			</select>
		</div>
	</div>
	<div class="formitm">
		<label class="lab">启用：</label>
		<div class="ipt"><input type="radio" name="status" value="1" <#if coupon.status==1>checked="checked"</#if>/>是&nbsp;&nbsp;&nbsp;<input type="radio" name="status" value="2" <#if coupon.status==2>checked="checked"</#if>/>否</div>
	</div>
	<div class="formitm">
		<label class="lab">发放时间：</label>
		<div class="ipt"><input type="text" name="putStartTime" id="startTime" style="width:90px;" class="easyui-validatebox" data-options="required: true" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')}',readOnly:true})" placeholder="起始时间"   class="searchTime" value="${coupon.putStartTime?string('yyyy-MM-dd HH:mm:ss')}"/>-
		<input type="text" name="putEndTime" id="endTime" style="width:90px;" class="easyui-validatebox" data-options="required: true" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'startTime\')}',readOnly:true})" placeholder="结束时间"  class="searchTime" value="${coupon.putEndTime?string('yyyy-MM-dd HH:mm:ss')}"/></div>
	</div>
	<div class="formitm">
		<label class="lab">有效期：</label>
		<div class="ipt"><input type="text" name="lifecycle" style="width:60px;" value="30" value="${coupon.lifecycle}">天</div>
	</div>
	<div class="formitm" id="rules" >
		<label class="lab">适用范围：</label>
		<div class="ipt" id="ruleList">
				<div class="ruleList"><input type="text" name="couponRules[0].minValue" value="${(couponRules[0].minValue)!}" style="width:60px;">≤投标金额&lt;
				<input type="text" name="couponRules[0].maxValue" value="${(couponRules[0].maxValue)!}"  style="width:60px;">时，比例
				<input type="text" name="denomination" value="${denomination}"  style="width:60px;"></div>
		</div>
	</div>

</div>
</form>
<script type="text/javascript">
    $(function() {
       $("#type").val("${coupon.code}");
       
    });
    
</script>
